-- GENERATED SPELL FOR [Xorothian Dreadsteed] --


function spell0_14502(pUnit, Event) --@Berserker Charge,n/a--
pUnit:FullCastSpellOnTarget(16636,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14502', 599, 1)
end

function spell1_14502(pUnit, Event) --@Flame Buffet,n/a--
pUnit:FullCastSpellOnTarget(22713,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14502', 20279, 1)
end

function spell2_14502(pUnit, Event) --@Summon Dreadsteed Spirit (DND),Self--
pUnit:FullCastSpellOnTarget(23159,pUnit)
pUnit:RegisterEvent('Sorts_14502', 596, 1)
end

function Sorts_14502(pUnit, Event)
local choix_sorts_14502 = math.random(0, 2)
if choix_sorts_14502 == 0 then
pUnit:RegisterEvent('spell0_14502', 1, 1)
end
if choix_sorts_14502 == 1 then
pUnit:RegisterEvent('spell1_14502', 1, 1)
end
if choix_sorts_14502 == 2 then
pUnit:RegisterEvent('spell2_14502', 1, 1)
end
end

function mob14502_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_14502', math.random(1500, 3000), 1)
end

function mob14502_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14502_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14502_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(14502, 1, 'mob14502_Action')
RegisterUnitEvent(14502, 2, 'mob14502_Leave')
RegisterUnitEvent(14502, 3, 'mob14502_Kill')
RegisterUnitEvent(14502, 4, 'mob14502_Die')
